/**
 * 
 */
package com.ms.service.module.baccarat.db;

import com.ms.service.module.gamelog.db.GameLogDAO;
import com.xpec.c4.service.module.task.TaskAsyncCommand;

/**
 * 百家樂儲存牌桌資料異步處理
 * 
 * @author TW15010
 */
public class BacrSavePlayerLogToRedisAsync extends TaskAsyncCommand {
	/**
	 * 牌桌 id
	 */
	private String tableId;

	/**
	 * Log 內容
	 */
	private BacrPlayerLogModel logModel;

	public BacrSavePlayerLogToRedisAsync(String tableId, BacrPlayerLogModel logModel) {
		super();
		this.tableId = tableId;
		this.logModel = logModel;
	}

	@Override
	public void asyncExecute() throws Exception {
		String key = BacrDAO.createPlayerLogKeyOnRedis(tableId, logModel.getRoundNumber(),
				logModel.getPlayerGUID());

		GameLogDAO.saveLogModelToRedis(key, logModel);
	}

	@Override
	public void execute() throws Exception {
	}
}
